<!--  @author:ymy  -->
<template>
  <div class="hot">
    <div class="hot-content">
      <div class="hot-item" v-for="item in hots" :key="item.teacher_id">
        <div class="hot-user">
          <div class="userinfo">
            <img
              :src="'https://ss.lanqb.com/' + item.user.avatar + '?imageView2/1/w/90/h/90'"
              alt=""
            />
            <p>{{ item.user.nickname }}</p>
          </div>
          <button><van-icon name="plus" />关注</button>
        </div>
        <div class="hot-pic" v-show="item.works.length !== 0">
          <img
            :src="'https://ss.lanqb.com/' + pic.cover_picture + '?imageView2/1/w/400/h/300'"
            alt=""
            v-for="pic in item.works"
            :key="pic.id"
          />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Hot',
  data() {
    return {};
  },
  props: ['hots'],
};
</script>

<style lang="less" scoped>
.hot {
  > .hot-content {
    width: 100vw;
    margin-bottom: 0.2rem;
    > .hot-item {
      background-color: white;
      width: 3.45rem;
      min-height: 0.46rem;
      display: flex;
      flex-direction: column;
      margin: 0 auto 0.07rem;
      padding: 0.15rem;
      > .hot-user {
        width: 100%;
        height: 0.31rem;
        line-height: 0.31rem;
        display: flex;
        justify-content: space-between;
        > .userinfo {
          display: flex;
          font-size: 0.15rem;
          > img {
            width: 0.31rem;
            height: 0.31rem;
            border-radius: 50%;
          }
          > p {
            display: inline-block;
            margin-left: 0.1rem;
          }
        }
        > button {
          width: 0.73rem;
          height: 0.25rem;
          line-height: 0.25rem;
          border-radius: 0.2rem;
          border: 1px solid #ddb256;
          font-size: 0.14rem;
          background-color: white;
          padding: 0.01rem 0.06rem;
          color: #ddb256;
          text-align: center;
          margin-top: 0.03rem;
        }
      }
      > .hot-pic {
        width: 3.45rem;
        height: 0.825rem;
        margin-top: 0.15rem;
        display: flex;
        justify-content: space-between;
        > img {
          width: 1.1rem;
          height: 0.825rem;
          border-radius: 0.1rem;
        }
      }
    }
  }
}
</style>
